\mode<presentation>

\newif\ifbeamer@secheader
\beamer@secheaderfalse

%\DeclareOptionBeamer{secheader}{\beamer@secheadertrue}
\ProcessOptionsBeamer

\useoutertheme[footline=authorinstitutetitle,subsection=false]{smoothbars}
\makeatletter % [add curpage/total page at the bottom](http://tex.stackexchange.com/questions/100838/beamer-dresden-theme-miniframes-appeareance-and-frame-number-insertion)
\newcommand{\frameofframes}{/}
\newcommand{\setframeofframes}[1]{\renewcommand{\frameofframes}{#1}}
\setbeamertemplate{footline} 
  {%
    \begin{beamercolorbox}[colsep=1.5pt]{upper separation line foot}
    \end{beamercolorbox}
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{author in head/foot}%
      \leavevmode{\usebeamerfont{author in head/foot}\insertshortauthor}%
      \hfill%
      {\usebeamerfont{institute in head/foot}\usebeamercolor[fg]{institute in head/foot}\insertshortinstitute}%
    \end{beamercolorbox}%
    \begin{beamercolorbox}[ht=2.5ex,dp=1.125ex,%
      leftskip=.3cm,rightskip=.3cm plus1fil]{title in head/foot}%
      {\usebeamerfont{title in head/foot}\insertshorttitle}%
      \hfill%
      {\usebeamerfont{frame number}\usebeamercolor[fg]{frame number}\insertframenumber~\frameofframes~\inserttotalframenumber}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[colsep=1.5pt]{lower separation line foot}
    \end{beamercolorbox}
  }
\makeatother
\useinnertheme{circles}

% \defbeamertemplate{title page}{A}{
%   \vbox{}
% 	\vfill%竖直方向空白填充，和下面的\vifll结合使用可以使它们之间的内容竖直居中
% 		\begin{beamercolorbox}[sep=8pt,center,rounded=true]{title}%使用一个彩色盒子环境，内容和边界的距离设置为8pt，内容居中对齐，边界拐角使用圆角。盒子的颜色使用title的颜色
% 			\usebeamerfont{title}\inserttitle\par%%插入标题内容，并对字体进行了设置
% 			\ifx\insertsubtitle\@empty%%\ifx的作用是比较两个字符串是否相等，这里的作用是判断是否有子标题，如果没有，就什么也不做
% 			\else%%有子标题
% 				\vskip0.25em%%竖直跳过一段距离
% 				{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}%%插入子标题，并设置了所使用的字体和前景颜色
% 			\fi%     
% 		\end{beamercolorbox}%
% 		\vskip2cm\par%%竖直跳过一段距离
% 		\begin{beamercolorbox}[sep=8pt,center]{institute}%使用一个彩色盒子环境，内容和边界的距离设置为8pt，内容居中对齐。盒子的颜色使用institute的颜色
% 			\usebeamerfont{institute}\insertinstitute\hskip1cm\usebeamerfont{author}\insertauthor\par%插入机构名和作者名，之间水平间隔1cm，并设置使用institute的字体
% 		\end{beamercolorbox}
% 	\vfill
% }

% \setbeamertemplate{title page}[A]

%\useoutertheme{default}
%\useinnertheme[shadow=true]{rounded}

\xdefinecolor{ucas}{RGB}{23, 73, 148}  %RGB#174994
\setbeamercolor{footline}{bg=ucas}
\setbeamercolor{frametitle}{bg=ucas,fg=white}
\setbeamercolor{title}{bg=ucas}
\setbeamerfont{frametitle}{size=\large}
%\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{bibliography item}[text]
\setbeamertemplate{caption}[numbered]

\setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg}
\setbeamercolor{palette secondary}{use=structure,fg=white,bg=structure.fg!75!black}
\setbeamercolor{palette tertiary}{use=structure,fg=white,bg=structure.fg!50!black}
\setbeamercolor{palette quaternary}{fg=white,bg=structure.fg!50!black}
%\setbeamercolor*{sidebar}{use=structure,bg=structure.fg}
\setbeamercolor{titlelike}{parent=palette primary}

%% try
\setbeamercolor{block title}{bg=ucas,fg=white}
\setbeamercolor*{block title example}{use={normal text,example text},bg=white,fg=ucas}
\setbeamercolor{fine separation line}{}
\setbeamercolor{item projected}{fg=white}
\setbeamercolor{palette sidebar primary}{use=normal text,fg=normal text.fg}
\setbeamercolor{palette sidebar quaternary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar secondary}{use=structure,fg=structure.fg}
\setbeamercolor{palette sidebar tertiary}{use=normal text,fg=normal text.fg}
%\setbeamercolor{palette sidebar quaternary}{fg=white}
\setbeamercolor{section in sidebar}{fg=brown}
\setbeamercolor{section in sidebar shaded}{fg=grey}
\setbeamercolor{separation line}{}
\setbeamercolor{sidebar}{bg=ucas}
\setbeamercolor{sidebar}{parent=palette primary}
\setbeamercolor{structure}{fg=ucas}
\setbeamercolor{subsection in sidebar}{fg=brown}
\setbeamercolor{subsection in sidebar shaded}{fg=grey}
\AtBeginSection[]{
	\begin{frame}
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
	\end{frame}
}
\AtBeginSubsection[]{
	\begin{frame}
		\tableofcontents[sectionstyle=show/shaded,subsectionstyle=show/shaded/hide,subsubsectionstyle=show/shaded/hide]
	\end{frame}
}

\mode
<all>
